<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>{{ config('app.name', 'Laravel') }}</title>


    <!-- Styles -->
    <link href="{{ asset('css/app.css') }}" rel="stylesheet">


</head>
<body class="bg-40">
<div id="app">
    <app>
        <template slot="user">
            @auth
                <a href="{{route('users.show',['user'=>auth()->user()])}}">{{auth()->user()->name}}</a>
                <tig-form class="inline" action="{{route('logout')}}">
                    <button type="submit">退出登录</button>
                </tig-form>

            @else
                <a href="{{route('login')}}">登录</a>
                <a href="{{route('register')}}">注册</a>
            @endauth
        </template>
        {{--<template slot="footer">.Page processed in {{round( microtime(true)-LARAVEL_START,2)}}s</template>--}}
        @yield('content')
    </app>
</div>
@push('script')
    <script>
        @foreach($errors->all() as $error)
        Vue.toasted.error('{{$error}}');
        @endforeach
    </script>


@endpush
<!-- Scripts -->
<script src="{{ asset('js/manifest.js') }}"></script>
<script src="{{ asset('js/vendor.js') }}"></script>
<script src="{{ asset('js/app.js') }}"></script>
@stack('script')

</body>
</html>
